﻿using Loki.IoC;
using Loki.IoC.Registration;

namespace Luna.Model.Budget
{
    public class ServiceInstaller : LokiContextInstaller
    {
        private static ServiceInstaller budget = new ServiceInstaller();

        public static ServiceInstaller Budget
        {
            get
            {
                return budget;
            }
        }

        public override void Install(IObjectContext context)
        {
            context.Register(Element.Entity<IEditableCategory, Category>());
            context.Register(Element.Entity<IEditableBudget, EditableBudget>());
            context.Register(Element.Entity<IEditableLine, EditableLine>());

            context.Register(Element.Service<IBudgetService, LunaBudgetService>());
        }
    }
}